package org.openrbac.rbac.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.openrbac.rbac.entity.Dict;

import java.util.List;

/**
* @author bapie
* @description 针对表【dict(数据字典)】的数据库操作Mapper
* @createDate 2024-04-03 15:37:15
* @Entity org.openrbac.entity.Dict
*/
public interface DictMapper extends BaseMapper<Dict> {

    @Select("<script>" +
            "select distinct id,dictname,label from dict where label in" +
            "<foreach collection='names' open='(' item='item' separator=',' close=')'>" +
            "#{item}"+
            "</foreach>"+
            "</script>")
    List<Dict> getIdsByNames(@Param("names") List<String> names);
}




